﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BLL
{
    public class Author
    {
        public Int64 Id { get; set; }
        public string FirstName { get; set; }
        public string Name { get; set; }

        public Author(Int64 id, string sortName)
        {
            var authorSplit = sortName.Split(',');
            this.Id = id;
            this.Name = authorSplit[0];
            if (authorSplit.Length > 1)
            {
                this.FirstName = authorSplit[1];
            }
        }

        public override string ToString()
        {
            return this.FirstName + " " + this.Name;
        }
    }
}
